﻿<%@ Page Language="c#" Inherits="WinnerCMS.WebUI.Admin.FriendLink.FriendLink" ValidateRequest="False"
    CodeBehind="FriendLink.aspx.cs" %>

<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!doctype html>
<html>
<head>
    <title>友情链接</title>
    <meta charset="utf-8" />
    <meta http-equiv="Pragma" content="No-cach" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    <script>
        function GetRequest() {
            $("#Img_Logo").show();
            $("#Img_Logo").attr("src", $("#txtLogo").val());
        }
        function Hide() {
            $("#Img_Logo").hide();
        }
    </script>
</head>
<body onload="Hide();">
    <form id="Form1" method="post" runat="server">

        <table id="NavigationPath">
            <tr>
                <td>管理导航：<a href="FriendLink.aspx">链接管理</a> &nbsp;| &nbsp;<a href="FriendLink.aspx?Action=Add">
                    添加链接</a>
                </td>
            </tr>
        </table>
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:UpdateProgress ID="UpdateProgress1" runat="server">
            <ProgressTemplate>
                <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
            </ProgressTemplate>
        </asp:UpdateProgress>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <asp:GridView ID="GV_List" runat="server" AutoGenerateColumns="False" DataKeyNames="ID"
                    OnRowCommand="GV_List_RowCommand" OnRowDataBound="GV_List_RowDataBound"
                    OnRowDeleting="GV_List_RowDeleting" GridLines="None" CssClass="table table-bordered table-condensed table-hover">
                    <Columns>
                        <asp:BoundField DataField="ID" HeaderText="ID">
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:BoundField>
                        <asp:BoundField DataField="Title" HeaderText="网站名字">
                            <ItemStyle Width="80px" />
                        </asp:BoundField>
                        <asp:ImageField DataImageUrlField="Logo" HeaderText="网站LOGO">
                            <ItemStyle HorizontalAlign="Center" Width="88px" Height="33px" />
                        </asp:ImageField>
                        <asp:HyperLinkField DataTextField="URL" HeaderText="网站网址" Target="_blank"
                            Text="网站网址" DataNavigateUrlFields="URL" />
                        <asp:ButtonField HeaderText="向上" Text="↑">
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:ButtonField>
                        <asp:ButtonField HeaderText="向下" Text="↓">
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:ButtonField>
                        <asp:HyperLinkField DataNavigateUrlFields="ID" DataNavigateUrlFormatString="FriendLink.aspx?Action=Edit&amp;ID={0}"
                            HeaderText="编辑" Text="编辑">
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:HyperLinkField>
                        <asp:CommandField HeaderText="删除" ShowDeleteButton="True">
                            <ItemStyle HorizontalAlign="Center" Width="40px" />
                        </asp:CommandField>
                        <asp:BoundField DataField="Pass" HeaderText="审核状态">
                            <ItemStyle HorizontalAlign="Center" Width="60px" />
                        </asp:BoundField>
                    </Columns>
                    <HeaderStyle CssClass="HeaderStyle" />
                </asp:GridView>
                <asp:Panel ID="Panel1" runat="server">
                    <br />
                    <table height="135" cellspacing="0" cellpadding="0" width="400" align="center" border="0">
                        <tr class="HeaderStyle">
                            <td width="100%">编 辑 链 接
                            </td>
                        </tr>
                        <tr>
                            <td class="border">
                                <table cellspacing="1" cellpadding="1" width="100%" align="center" border="0">
                                    <tr>
                                        <td width="92" align="right">网站名称：
                                        </td>
                                        <td width="301">
                                            <asp:TextBox ID="txtTitle" runat="server" Width="147px"></asp:TextBox>
                                            <span style="color: #ff0000">*<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
                                                runat="server" ControlToValidate="txtTitle" ErrorMessage="请输入网址名称"></asp:RequiredFieldValidator></span>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">网站LOGO：
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtLogo" runat="server" Width="215px"></asp:TextBox>
                                            <br>
                                            <asp:Image ID="Img_Logo" runat="server"></asp:Image><input class="btn btn-default" onclick="GetRequest();"
                                                type="button" value="测试Logo"></input>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">审核通过：
                                        </td>
                                        <td>
                                            <asp:CheckBox ID="cbkPass" runat="server" />
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="right">网站网址：
                                        </td>
                                        <td>
                                            <asp:TextBox ID="txtURL" runat="server" Width="223px"></asp:TextBox>
                                            <span style="color: #ff0000">*</span>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtURL"
                                                ErrorMessage="请输入网址"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                </table>
                            </td>
                        </tr>
                    </table>
                    <p align="center">
                        <asp:Button ID="btnOK" runat="server" Text="确定" OnClick="btnOK_Click" Cssclass="btn btn-default"></asp:Button>
                    </p>
                </asp:Panel>
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>
